import Mock from 'mockjs'
import User from './user'
import Category from './category'
import Hot from './hot'
import BookNews from './boosNews'
import Book from './book'
import Search from './search'
import Register from './register'

Mock.mock('/ceshi', 'get', () => {
    return User.user
})

Mock.mock('/category', 'get', () => {
    return Category.category
})

Mock.mock('/api/v1/user/category', 'get', () => {
    return Category.category.map(v => v.name)
})

Mock.mock('/hot', 'get', () => {
    return Hot.hot
})

Mock.mock('/booksNews', 'get', () => {
    return BookNews.bookNews
})


Mock.mock('/book', 'get', () => {
    return Book.book
})

Mock.mock('/search?wd=VC', 'get', () => {
    return Search.search
})

Mock.mock('/user/123', 'get', () => {
    return User.user
})

Mock.mock('/register', 'post', () => {
    return Register.register
});

Mock.mock('/login', 'post', () => {
    return User.user
})